<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        body {
            background-color: #006600;
        }
        
        #root {
            width: 500px;
            height: 500px;
            background-color: #3fee90;
            border-radius: 50%;
            overflow: hidden;
            position: relative;
        }
        
        #xin {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: yellow;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
            z-index: 200;
        }
        
        li {
            width: 100px;
            height: 100px;
            text-align: center;
            line-height: 100px;
            /* background-color: #006600; */
            list-style: none;
            color: white;
            font-size: 32px;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
        }
        
        ul {
            /* transform: rotate(-60deg); */
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
        }
        
        #shi {
            width: 30px;
            height: 100px;
            background-color: #899bff;
            position: absolute;
            left: 0;
            right: 0;
            top: 150px;
            margin: auto;
            border-radius: 50% 50% 0 0;
            transform-origin: bottom;
        }
        
        #fen {
            width: 20px;
            height: 150px;
            background-color: #2b3ea7;
            position: absolute;
            left: 0;
            right: 0;
            top: 100px;
            margin: auto;
            border-radius: 50% 50% 0 0;
            transform-origin: bottom;
        }
        
        #miao {
            width: 10px;
            height: 200px;
            background-color: #3cff00;
            position: absolute;
            left: 0;
            right: 0;
            top: 50px;
            margin: auto;
            border-radius: 50% 50% 0 0;
            transform-origin: bottom;
        }
        
        span {
            /* background-color: rgb(255, 52, 52); */
            display: block;
            /* width: 10px;
            height: 10px; */
        }
    </style>
</head>

<body>
    <div id="root">


        <ul>


            <li> <span>3</span> </li>
            <li><span>4</span></li>
            <li><span>5</span></li>
            <li><span>6</span></li>
            <li><span>7</span></li>
            <li><span>8</span></li>
            <li><span>9</span></li>
            <li><span>10</span></li>
            <li><span>11</span></li>
            <li><span>12</span></li>
            <li><span>1</span></li>
            <li><span>2</span></li>
        </ul>
        <div id="xin">

        </div>
        <div id="shi">

        </div>
        <div id="fen">

        </div>
        <div id="miao">

        </div>
    </div>
</body>

</html>
<script type="text/javascript">
    var li = document.getElementsByTagName('li');
    var sp = document.getElementsByTagName('span');
    console.log(sp);

    for (var i = 0; i < li.length; i++) {
        li[i].style.transform = "rotate(" + i * 30 + "deg)" + "translate(200px,0)";
        sp[i].style.transform = "rotate(-" + i * 30 + "deg)";

    }
    // 获取当前时间

    // console.log(shi1, fen1, miao1);
    setInterval(function() {
        var shijian = new Date;
        // 获取小时;
        var shi1 = shijian.getHours();
        // 获取分钟;
        var fen1 = shijian.getMinutes();
        // 获取秒;
        var miao1 = shijian.getSeconds();
        shi.style.transform = "rotate(" + (shi1 * 30+(fen1/60*30)) + "deg)"
        fen.style.transform = "rotate(" + fen1 * 6 + "deg)"
        miao.style.transform = "rotate(" + miao1 * 6 + "deg)"
            // console.log(shi1, fen1, miao1);
    }, 1000)
</script>